<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class model_option extends CI_Model{
    var $table      = "tbl_options";
    
    public function __construct()
    {
        parent::__construct();
    }
    
    function add_option($data){
        if( empty($data) ) return false;
        if( $this->db->insert($this->table, $data) ) {
            $id = $this->db->insert_id();
            return $id;
        };
        return false;
    }
    
    function update_option($data, $id){
        if( empty($id) ) return false;
        if( empty($data) ) return false;
        if( $this->db->update($this->table, $data, array('id_option' => $id)) ) return true;
        return false;
    }
}
/* End of file model_option.php */
/* Location: ./application/models/model_option.php */
